{% extends "default/base.html" %}
{% block title %}{{ title }}{% endblock %}
{% block header %}
  <h1 class="blog-title">Hello World</h1>
  <p class="lead blog-description">wxxiaohello.sinaapp.com | 追求的不仅是生活，更是梦想...</p>
{% endblock %}
{% block content %}
	{% if blog_list %}
		{% for blog in blog_list %}
          <div class="blog-post">
            <h2 class="blog-post-title">{{ blog.title }}</h2>
            <p class="blog-post-meta">
            	<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span><span class="blog-post-label">{{ blog.time|date:"Y-m-d" }}</span>
            	<span class="glyphicon glyphicon-tags" aria-hidden="true"></span><span class="blog-post-label">{{ blog.classify.content }}</span>
            </p>
           {{ blog.summary }} <span class="blog-read-more"><a href="{% url 'blog' blog.id%}" title="{{ blog.title }}">[阅读更多内容]</a></span>
          </div><!-- /.blog-post -->
		{% endfor%}
		{% else %}
		  <div class="blog-post">
              <p>NO PAGES NOW.</p>
          </div>
	{% endif %}
		<!-- pagination -->
          <nav>
            <ul class="pager">
            {% if blog_list.has_previous %}
              <li><a href="{{ query }}{{ blog_list.previous_page_number}}">上一页</a></li>
            {% endif %}
			{% if blog_list.has_next %}
              <li><a href="{{ query }}{{ blog_list.next_page_number}}">下一页</a></li>
            {% endif %}
            </ul>
          </nav>
{% endblock %}
